public class Test {
    //递归求 1 + 2 + 3 + ... + 10
    public  static int fun(int n){
        int sum=0;
        if(n==1){
            return 1;
        }
        sum+=n+fun(n-1);
        return sum;
    }
    public static void main(String[] args) {
        System.out.println(fun(10));
    }
}
